﻿using System;
using System.Windows.Forms;

namespace fund
{
    public static class Extensions
    {
        public static void SafeCall(this Control ctrl, Action callback)
        {
            if (ctrl.InvokeRequired)
                ctrl.Invoke(callback);
            else
                callback();
        }
    }
}